|
Tweek
|
A d d i t i v e S y n t h e s i s Version 1.0.0 Coded by David J "KrimZon" Laurie |
|
Adding Sine Waves
|
Parameters: NumSines, Mode, Step, StepOfs, Fade Tweek creates sounds by mixing together a bunch of sine waves. The first wave is always the base frequency of the current note, the frequency and amplitude of the other waves are controlled parametrically. Frequency is controlled with a frequency multiplier which iterates for each sine wave. The first sine wave has frequency multiplier 1, meaning it plays the base note. NumSines specifies the number of sines to play, including the base note. Mode specifies whether we multiply or add to this frequency multiplier by Step to get the multiplier for each successive sine. StepOfs is the step for the first wave after the base note. For example, Mode Multiply with Numsines 4, Step 2, StepOfs 4 will generate notes with frequency multipliers 1, 4, 8, 16. Mode Add with Numsines 6, Step 2, Stepofs 2 will generate multipliers 1, 3, 5, 7, 9, 11 (A square wave pattern) Fade is the divider between successive sine waves. A high fade will produce quieter successive waves and a softer sound, while a low fade will produce louder successive waves and a sharper sound. |
|
Amplitude Envelope
|
Parameters: Attack, Decay, Sustain, Release Attack, Decay, Sustain and Release control the timing of the different parts of the envelope. Attack builds up from 0 to 2 times normal volume. Decay fades from 2 to 1 times normal volume. Sustain holds at normal volume, and release fades from normal to zero. When a note is stopped, it will fade away over the release time. Parameters: AttFade, DecFade, SusFade, RelFade These parameters control how the value of fade changes over the note. The value starts at Fade, and then slides to AttFade by the time attack has finished and so on. |
|
Gliding Notes
|
Parameters: LeadGlide, TrailGlide, Lead Note, Note, Trail Note Bending notes is very simple. If lead note is specified, the note will start at the lead note frequency, and then slide to the note frequency over the period LeadGlide, specified as a percentage of the total note time. TrailGlide operates the same way, but fading from note to trail note at the end of the note. Note: Take care not to allow LeadGlide and TrailGlide to total higher than 100% otherwise the frequency will jump in the middle somewhere. |
|
Summary
|
Tweek can make a range of sounds. I myself have tested it for square wave, organ and bass instruments with good results. A word of caution though: although up to 256 sines can be used at once, high numbers really use up the CPU. An additional note is that sine waves higher than 22,000Hz are not played to prevent aliasing. |
|
Feedback
|
Please send any bug reports and feedback to krimzon@planetbilge.com KrimZon |